<template>
  <el-input type="password" :disabled="disabled" v-model="valData" autocomplete="off"></el-input>
</template>

<script>
  export default {
    props: {
      value: {
        type: [String, Object],
        default: null
      },
      disabled: {
        type: Boolean,
        default: false
      }
    },
    data () {
      return {
        valData: ''
      }
    },
    created () {
      this.valData = this.value
    },
    watch: {
      value (val) {
        this.valData = val
      },
      valData (val) {
        this.$emit('input', val)
      }
    }
  }
</script>